import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
import { defineAsyncComponent } from 'vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/text',
    component: defineAsyncComponent(() => import("@/views/TextView.vue"))
  },
  {
    path: '/imgcap',
    component: () => import("@/components/ImgCapture.vue")
  },
  {
    path: '/capture',
    component: () => import("@/components/CaptureItem.vue")
  },
  {
    path: '/sing',
    component: () => import("@/components/DrawRect.vue")
  },
  {
    path: '/audio',
    component: () => import("@/components/AdiouCanvas.vue")
  },
  {
    path: '/filler',
    component: () => import("@/components/Filler.vue")
  },

]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
